package com.hehe.boot.pojo;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor //有参构造器
@NoArgsConstructor  //无参构造器
@TableName("drug") // 对应数据库表名
public class Drug {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "ID")
    private Long id;

    @TableField(value = "created_at",fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at",fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableField("deleted_at")
    @TableLogic(value = "Null")
    private LocalDateTime deletedAt;

    @TableField("name")
    @ApiModelProperty(value = "药物名称")
    private String name;

    @TableField("detail")
    @ApiModelProperty(value = "药物描述")
    private String detail;

    @TableField("factory")
    @ApiModelProperty(value = "药物生产厂家")
    private String factory;
}
